package com.gochart;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by dev on 16-7-12.
 */
public class main {
    public static void main(final String... args) throws Exception {

        AbstractApplicationContext ctx =
                new ClassPathXmlApplicationContext("rabbitMQ.xml");
        RabbitTemplate template = ctx.getBean(RabbitTemplate.class);
        Integer i=0;
        do {
//            template.convertAndSend("Hello, world!");
            i++;
        } while (i<12);

        i.wait();
        ctx.destroy();
    }
}
